package com.oggero.glossarium.persistence.delegate;

import com.oggero.glossarium.persistence.dao.VocaboloDao;
import com.oggero.glossarium.persistence.common.ServiziDb;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

public class GlossarioDelegate implements ServiziDb {

    private VocaboloDao vocaboloDao;

    public void setVocaboloDao(VocaboloDao vocaboloDao) {
        this.vocaboloDao = vocaboloDao;
    }

    /**
     * 
     * @param objectToInsert
     * @return 
     */
    public Object insert(Object objectToInsert) throws Exception {
        try {
            return vocaboloDao.insert(objectToInsert);
        } catch (Exception ex) {
            Logger.getLogger(GlossarioDelegate.class.getName()).log(Level.SEVERE, null, ex);
            throw ex;
        }
    }

    public Object update(Object objectToUpdate) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public Object delete(Object objectToDelete) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public Object findObject(Object objectToFind) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public List<Object> findAllObjects() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
}
